Skip to content

⚡ Bolt: [성능 개선] 정적 문자열 및 해시 계산 호이스팅 - #284

Closed
seonghobae wants to merge 1 commit into
masterfrom
bolt-performance-optimization-11766405034003914800
Closed

⚡ Bolt: [성능 개선] 정적 문자열 및 해시 계산 호이스팅#284
seonghobae wants to merge 1 commit into
masterfrom
bolt-performance-optimization-11766405034003914800

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: process_dir 함수 내부의 불변 CSS 문자열과 SHA-256 해시 계산 로직을 파일 레벨 상수로 호이스팅했습니다.
🎯 Why: 매 디렉토리마다 동일한 문자열을 할당하고 비싼 해시 연산을 반복하는 것을 방지하여 성능을 최적화하기 위함입니다.
📊 Impact: 대규모 디렉토리 순회 시 불필요한 메모리 할당 및 CPU 사용량을 크게 줄여 애플리케이션 속도를 향상시킵니다.
🔬 Measurement: gradlew test 실행 시 메모리 프로파일링을 통해 개선 확인 가능 및 테스트 성공 여부로 무결성 검증.


PR created automatically by Jules for task 11766405034003914800 started by @seonghobae

Copilot AI review requested due to automatic review settings July 27, 2026 03:39
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fb27dd16-3306-4e08-afff-831e8ff5ea60

📥 Commits

Reviewing files that changed from the base of the PR and between a859a11 and c5ab065.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • src/main/kotlin/html4tree/main.kt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-performance-optimization-11766405034003914800

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes process_dir by hoisting the invariant inline CSS and its SHA-256 CSP hash computation to file-level properties, avoiding repeated allocations and hashing work per directory traversal.

Changes:

  • Hoisted the static CSS string into a file-level private val.
  • Hoisted SHA-256 hashing + Base64 encoding for CSP style-src into a file-level private val.
  • Updated the generated HTML to reference the hoisted CSP hash and CSS tag.
  • Logged the optimization as a new Bolt learning entry.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/kotlin/html4tree/main.kt Hoists CSS/CSP hash generation out of process_dir and updates HTML template to use the shared values.
.jules/bolt.md Documents the new performance optimization learning entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +86 to +89
private val CSS_TAG = """
<style>
${CSS_CONTENT} </style>
"""

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by canonical #363. The same stylesheet/hash hoist is implemented there together with exact emitted-byte CSP correctness, independent generated-page digest verification, APA 7 doctoring, changelog, and fresh current-head CI/JaCoCo/security evidence. No result from this duplicate head is reused.

@seonghobae seonghobae closed this Aug 5, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing as superseded by canonical #363. The same stylesheet/hash hoist is implemented there together with exact emitted-byte CSP correctness, independent generated-page digest verification, APA 7 doctoring, changelog, and fresh current-head CI/JaCoCo/security evidence. No result from this duplicate head is reused.

Understood. Acknowledging that this work is now obsolete and superseded by canonical #363, and stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants